const { connection } = require('../../model/database')

module.exports = (req, res) => {
    // 查询文章
    var sql = `select * from article where id = ${req.query.id}`

    connection.query(sql, (error, reslut) => {
        if (error) {
            res.send('错误')
            return
        }
        res.send(reslut)
    })

}